package com.itheima.day04_work.Test03;
//运行结果：
//吃饭
public class Demo3 {



    public static void main(String[] args) {
        Person p = getInstance();
        p.eat();
    }

    private static Person getInstance() {
        // 请补齐代码，使得编译通过，并在控制台输出(吃饭)
        Person p = new Person();
        return p;
    }
}

    class Person {
        public void eat(){
            System.out.println("吃饭");
        }
    }


